#include "geometryobjects.h"

bool GeometryObjects::m_initialized = false;

void GeometryObjects::init()
{
  if(GeometryObjects::m_initialized)
    return;
  
  m_clipplanes = new ClipPlanes();
  m_initialized = true;
}

ClipPlanes* GeometryObjects::m_clipplanes = NULL;
ClipPlanes* GeometryObjects::clipplanes() 
{ 
  if(!GeometryObjects::m_initialized) GeometryObjects::init();
  return m_clipplanes; 
}

bool GeometryObjects::inPool = false;
bool GeometryObjects::showGeometry = true;

void
GeometryObjects::removeFromMouseGrabberPool()
{
  if(!GeometryObjects::m_initialized) GeometryObjects::init();
  m_clipplanes->removeFromMouseGrabberPool();
}

void
GeometryObjects::addInMouseGrabberPool()
{
  if(!GeometryObjects::m_initialized) GeometryObjects::init();
  m_clipplanes->addInMouseGrabberPool();
}

void
GeometryObjects::show()
{
  if(!GeometryObjects::m_initialized) GeometryObjects::init();
  m_clipplanes->show();
}

void
GeometryObjects::hide()
{
  if(!GeometryObjects::m_initialized) GeometryObjects::init();
  m_clipplanes->hide();
}
